/*
 * =====================================================================================
 *
 *       Filename:  timer.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  08/31/2010 06:12:15 PM
 *       Revision:  09/06/2010 by Dinesh Agarwal- dinwal@gmail.com. Function returns double now. 
 *       Compiler:  gcc
 *
 *         Author:  Nicholas Mancuso (nam), nick.mancuso@gmail.com
 *        Company:  GSU Computer Science Dept
 *
 * =====================================================================================
 */
#pragma once
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>


double my_difftime();

double my_difftime ()
{
    struct timeval tp;
    struct timezone tzp;
    int i;

    i = gettimeofday(&tp,&tzp);
    return ( (double) tp.tv_sec + (double) tp.tv_usec * 1.e-6 );
};
